package router

import (
	"fileNest/controller"

	"github.com/gin-gonic/gin"
)

func RegisterFile(route *gin.Engine) {
	r := route.Group("/api/file")
	{
		r.GET("getFolderTree", controller.GetFolderTree)
		r.GET("getFolderById", controller.GetFolderById)
		r.POST("addFolder", controller.AddFolder)
		r.GET("getPreviewUrl", controller.GetPreviewUrl)
		r.PATCH("updateFile", controller.UpdateFile)
		r.DELETE("delFile", controller.DelFile)
		r.DELETE("restore", controller.Restore)
		r.POST("downloadFile", controller.DownloadFile)
	}
}
